#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QSplitter>
#include <QtGui>
#include <QWidget>

#include "algorithm.h"
#include "algorithmstrategy.h"
#include "reportviewwidget.h"
#include "des.h"


class SettingOption;
class CryptionDialog;
class CurveDialog;
class ParamSets;
class DES;
struct Result;
namespace Ui {
    class MainWindow;
}


class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    void setGUI();
    void setSignal();

    Result result;
//    Algorithm *alg;
    DES *alg;
    AlgorithmStrategy *algstrategy;

private:
    void exportPdf();
    bool getCurrentPdfStr();
    QString pdfStr;
    void layoutSetup();
    void encryption();
    FileIO persFileIO;
    int flag;


private slots:
    void saveModelToPDF();
    void chooseSetting();

    void attackbegin();

    void on_action_pdf_triggered();

    void on_actionISE_triggered();

    void on_actionDC_triggered();

    void on_actionPrimePower_triggered();

    void on_actionModelSim_triggered();

public slots:
    void set_processbarvalue(int,int);
//    void set_processbarvalue2(int);

private:
    Ui::MainWindow *ui;
    CryptionDialog *cryption;
    reportViewWidget *viewWidget;
    ParamSets *paramset;
    CurveDialog *curvedialog;
    SettingOption *settings;
    QSplitter *mainsplitter;
    QSplitter *rightsplitter;

};

#endif // MAINWINDOW_H
